/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package expenseslist;

import java.sql.ResultSet;

/**
 *
 * @author trunghpb
 */
public class AccountDB {

    public AccountDB(int _id) {
        this._id = _id;
    }
    
    public AccountDB(int Id, String Name) {
        _id = Id;
        _name = Name;
    }

    public AccountDB(int _id, String _name, String _description) {
        this._id = _id;
        this._name = _name;
        this._description = _description;
    }

      
    public AccountDB() {
    }
    
    public int getID(){return _id;}
    public String getName() {return _name;}
    public String getDesc() {return _description;}
    
    public ResultSet find() throws Exception{
        ResultSet rs = MySqlDb.create()
                .connect()
                .getResult("SELECT account_id, account_name, account_description FROM account");
        return rs;
    }
    
    public AccountDB setID(int id){
        _id = id;
        return this;
    }
    
    private int _id;
    private String _name;
    private String _description;
    
}
